package com.cazor.mg.domain;

import java.util.Date;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.cazor.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cazor.common.core.domain.BaseEntity;

/**
 * 参数历史对象 mg_param_log
 *
 * @author cazor
 * @date 2023-11-27
 */
@TableName("mg_param_log")
public class MgParamLog
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 上级编码 */
    @Excel(name = "上级编码")
    private String parentCode;

    /** 参数标签 */
    @Excel(name = "参数标签")
    private String paramLabel;

    /** 参数名称 */
    @Excel(name = "参数名称")
    private String paramName;

    /** 参数值 */
    @Excel(name = "参数值")
    private String paramValue;

    /** json数据 */
    @Excel(name = "json数据")
    private String jsonInfo;

    /** 读取时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "读取时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date readDate;

    /** 预警阈值 */
    @Excel(name = "预警阈值")
    private String earlyThreshold;

    /** 上级类型【1.设备2.采集器 3.分组】 */
    @Excel(name = "上级类型【1.设备2.采集器 3.分组】")
    private Integer parentType;

    /** 是否上报（0,未上报 1,已上报） */
    @Excel(name = "是否上报", readConverterExp = "0=,未上报,1=,已上报")
    private String isReport;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchNo;

    /** gnss读取时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "gnss读取时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gnssReadDate;

    /** 是否超量程【0.正常，1超量程】 */
    @Excel(name = "是否超量程【0.正常，1超量程】")
    private Long isOutrange;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;
    /**  */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
    private Date readDateIndex;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setParentCode(String parentCode)
    {
        this.parentCode = parentCode;
    }

    public String getParentCode()
    {
        return parentCode;
    }
    public void setParamLabel(String paramLabel)
    {
        this.paramLabel = paramLabel;
    }

    public String getParamLabel()
    {
        return paramLabel;
    }
    public void setParamName(String paramName)
    {
        this.paramName = paramName;
    }

    public String getParamName()
    {
        return paramName;
    }
    public void setParamValue(String paramValue)
    {
        this.paramValue = paramValue;
    }

    public String getParamValue()
    {
        return paramValue;
    }
    public void setJsonInfo(String jsonInfo)
    {
        this.jsonInfo = jsonInfo;
    }

    public String getJsonInfo()
    {
        return jsonInfo;
    }
    public void setReadDate(Date readDate)
    {
        this.readDate = readDate;
    }

    public Date getReadDate()
    {
        return readDate;
    }
    public void setEarlyThreshold(String earlyThreshold)
    {
        this.earlyThreshold = earlyThreshold;
    }

    public String getEarlyThreshold()
    {
        return earlyThreshold;
    }
    public void setParentType(Integer parentType)
    {
        this.parentType = parentType;
    }

    public Integer getParentType()
    {
        return parentType;
    }
    public void setIsReport(String isReport)
    {
        this.isReport = isReport;
    }

    public String getIsReport()
    {
        return isReport;
    }
    public void setBatchNo(String batchNo)
    {
        this.batchNo = batchNo;
    }

    public String getBatchNo()
    {
        return batchNo;
    }
    public void setGnssReadDate(Date gnssReadDate)
    {
        this.gnssReadDate = gnssReadDate;
    }

    public Date getGnssReadDate()
    {
        return gnssReadDate;
    }
    public void setIsOutrange(Long isOutrange)
    {
        this.isOutrange = isOutrange;
    }

    public Long getIsOutrange()
    {
        return isOutrange;
    }
    public void setReadDateIndex(Date readDateIndex)
    {
        this.readDateIndex = readDateIndex;
    }

    public Date getReadDateIndex()
    {
        return readDateIndex;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("parentCode", getParentCode())
                .append("paramLabel", getParamLabel())
                .append("paramName", getParamName())
                .append("paramValue", getParamValue())
                .append("jsonInfo", getJsonInfo())
                .append("readDate", getReadDate())
                .append("earlyThreshold", getEarlyThreshold())
                .append("parentType", getParentType())
                .append("isReport", getIsReport())
                .append("batchNo", getBatchNo())
                .append("gnssReadDate", getGnssReadDate())
                .append("isOutrange", getIsOutrange())
                .append("readDateIndex", getReadDateIndex())
                .append("params", getParams())
                .toString();
    }
}
